import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App);

import router from './router';
app.use(router);

import pinia from './stores';
app.use(pinia);

import 'element-plus/dist/index.css';
import ElementPlus from 'element-plus';
import * as elementPlusIcons from '@element-plus/icons-vue'
Object.keys(elementPlusIcons).forEach(key=>{
    //elementPlusIcons as any 这里ts学的不咋地 只能先any大法了
    app.component(key,(elementPlusIcons as any)[key])
    // 也可这样写
    //app.component(key,elementPlusIcons[key as keyof typeof elementPlusIcons])
})
app.use(ElementPlus);

app.mount('#app');
